package com.ats.web.managed.utils;

import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import org.primefaces.model.DashboardColumn;
import org.primefaces.model.DashboardModel;
import org.primefaces.model.DefaultDashboardColumn;
import org.primefaces.model.DefaultDashboardModel;

@ManagedBean(name = "cardListDashBoardMB")
@ViewScoped
public class CardListDashBoardMB {

	 private DashboardModel model;
     
	    @PostConstruct
	    public void init() {
	        setModel(new DefaultDashboardModel());
	        DashboardColumn column1 = new DefaultDashboardColumn();
	        DashboardColumn column2 = new DefaultDashboardColumn();
	         
	        column1.addWidget("std1");
	        column1.addWidget("std2");
	        column1.addWidget("std3");
	         
	        column2.addWidget("std6");
	        column2.addWidget("std5");
	        column2.addWidget("std4");
	         
	        
	 
	        getModel().addColumn(column1);
	        getModel().addColumn(column2);
	    }

		/**
		 * @return the model
		 */
		public DashboardModel getModel() {
			return model;
		}

		/**
		 * @param model the model to set
		 */
		public void setModel(DashboardModel model) {
			this.model = model;
		}
}
